//
//  HSYBaseNavigationController+Animation.h
//  高仿暴走斗图
//
//  Created by key on 16/3/21.
//  Copyright © 2016年 huangsongyao. All rights reserved.
//

#import "HSYBaseNavigationController.h"

#define CARD_ANIMATION_OFFSET       20.0f

@interface HSYBaseNavigationController (Animation)

/**
 *  move 转场动画算法
 *
 *  @param x                  移动点
 *  @param blackMask          黑色笼罩
 *  @param startBackViewX     起始笼罩点
 *  @param lastScreenShotView 缓存的卡片图
 */
- (void)moveViewWithX:(CGFloat)x withBlackMask:(UIView *)blackMask startBackViewX:(CGFloat)startBackViewX lastScreenShotView:(UIImageView *)lastScreenShotView;

/**
 *  card 转场动画算法
 *
 *  @param x                  移动点
 *  @param blackMask          黑色笼罩
 *  @param startBackViewX     起始笼罩点
 *  @param lastScreenShotView 缓存的卡片图
 */
- (void)cardViewWithX:(CGFloat)x withBlackMask:(UIView *)blackMask startBackViewX:(CGFloat)startBackViewX lastScreenShotView:(UIImageView *)lastScreenShotView;
/**
 *  UIView动画二次封装
 *
 *  @param duration   动画时长
 *  @param animations 动画内容
 *  @param completion 动画完成后的block回调
 */
- (void)pop_MoveAnimationWithDuration:(NSTimeInterval)duration animations:(void(^)())animations completion:(void(^)(BOOL finished))completion;

/**
 *  UIView动画二次封装
 *
 *  @param duration   动画时长
 *  @param op         UIViewAnimationOptions 枚举
 *  @param animations 动画内容
 *  @param completion 动画完成后的block回调
 */
- (void)pop_CardAnimationWithDuration:(NSTimeInterval)duration options:(UIViewAnimationOptions)op animations:(void(^)())animations completion:(void(^)(BOOL finished))completion;

/**
 *  滑动结束的动画处理
 *
 *  @param location 结束点位置
 *  @param type     动画结束类型，枚举
 */
- (void)endStutasWithLocation:(CGFloat)location endAnimationType:(kHSYAnimationEndType)type;

@end
